﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Strongshell.Recoil.Core.Composition
{
    /// <summary>
    /// Creates names for objects
    /// </summary>
    public interface IObjectNameFactory
    {
        /// <summary>
        /// Creates a non-unique name based on the generic type parameter.
        /// </summary>
        /// <typeparam name="TTarget">The type from which the name should be created.</typeparam>
        /// <returns>Name</returns>
        string CreateName<TTarget>();

        /// <summary>
        /// Creates a non-unique name based on the <see cref="Type"/> supplied.
        /// </summary>
        /// <param name="target">The type from wich the name sould be created.</param>
        /// <returns>Name</returns>
        string CreateName(Type target);

        /// <summary>
        /// Creates a unique name based on the generic type parameter. Repeatedly calling this method
        /// using the same type parameter will produce different names.
        /// </summary>
        /// <typeparam name="TTarget">The type from which the name should be created.</typeparam>
        /// <returns>Name</returns>
        string CreateUniqueName<TTarget>();

        /// <summary>
        /// Creates a unique name based on the <see cref="Type"/> supplied. Repeatedly calling this method
        /// using the same type parameter will produce different names.
        /// </summary>
        /// <param name="target">The type from wich the name sould be created.</param>
        /// <returns>Name</returns>
        string CreateUniqueName(Type target);
    }
}